<template>
  <div>
    <router-view v-slot="{ Component }">
      <keep-alive>
        <component
          :is="Component"
          v-if="$route.meta.cache"
          :key="$route.path"
        />
      </keep-alive>
    </router-view>

    <router-view v-slot="{ Component }">
      <component :is="Component" v-if="!$route.meta.cache" :key="$route.path" />
    </router-view>
  </div>
</template>

<script setup lang="ts">
import { refreshScale } from '@/utils'
import { useRoute } from 'vue-router'
let $route = useRoute()
refreshScale()
window.addEventListener('resize', refreshScale)
</script>

<style scoped></style>
